package com.java2104.entity;

import java.sql.Date;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

//员工类
public class Employee {
    private String empno;//员工编号
    private String ename;//员工姓名
    private Date birthday;//出生年月日
    private String tel;//电话
    private String address;//家庭住址

    //为了解决一对多或多对多之间的关联，使用集合（List或Set）
    List<Card> cardList = new LinkedList<>();

    public List<Card> getCardList() {
        return cardList;
    }

    public void setCardList(List<Card> cardList) {
        this.cardList = cardList;
    }

    public Employee() {
    }

    public Employee(String empno, String ename, Date birthday, String tel, String address) {
        this.empno = empno;
        this.ename = ename;
        this.birthday = birthday;
        this.tel = tel;
        this.address = address;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "empno='" + empno + '\'' +
                ", ename='" + ename + '\'' +
                ", birthday=" + birthday +
                ", tel='" + tel + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

    public String getEmpno() {
        return empno;
    }

    public void setEmpno(String empno) {
        this.empno = empno;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
